import { request } from 'umi';

/** 获取 cloums 列表 */
export async function cloumsGet(params: CLOUMS.CLOUMSParams, options?: Record<string, any>) {
  return request<Record<string, any>>('/api/indicatorList', {
    params,
    method: 'GET',
    ...(options || {}),
  });
}

/** 新增 cloums */
export async function cloumsAdd(data: CLOUMS.CLOUMSAdd, options?: Record<string, any>) {
  return request<Record<string, any>>('/api/indicator', {
    data,
    method: 'POST',
    ...(options || {}),
  });
}

/** 修改 cloums */
export async function cloumsModify(data: CLOUMS.CLOUMSModify, options?: Record<string, any>) {
  return request<Record<string, any>>('/api/indicator', {
    data,
    method: 'PUT',
    ...(options || {}),
  });
}

/** 删除 cloums */
// export async function cloumsDelte(params: CLOUMS.CLOUMSDel, options?: Record<string, any>) {
//   debugger;
//   return request<Record<string, any>>('/api/indicator', {
//     params,
//     method: 'POST',
//     ...(options || {}),
//   });
// }

/** 删除 cloums */
export async function cloumsDelte(data: CLOUMS.CLOUMSDel, options?: Record<string, any>) {
  return request<Record<string, any>>('/api/indicator', {
    data,
    method: 'DELETE',
    ...(options || {}),
  });
}
